package com.itheima.stream;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.function.BiConsumer;
import java.util.function.BinaryOperator;
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.stream.Collector;

public class Demo03 {

    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>(List.of("张三丰", "张三丰", "张无忌", "张翠山", "王二麻子", "张良", "谢广坤"));


        long count = list.stream().limit(3).count();
        System.out.println(count);
        System.out.println(list);
    }
}
